import { useQuery } from '@tanstack/react-query'
import { useAxios } from '../hooks/useAxios'

export const useUserInfoQuery = () => {
  const { http } = useAxios()
  return useQuery({
    queryKey: ['user.info'],
    queryFn: async () => await http.get('/admin/current'),
  })
}
